<?php

namespace app\admin\model;

use think\Model;

class Car extends Model
{
    public function getlicenseTypeAttr($value,$data)
    {
        $status = [ 1 =>'普通车牌', 2 => '新能源车牌'];
        return $status[$data['type']] ?? '';
    }

    public function user()
    {
        return $this->belongsTo(User::class);
    }
}
